import { HomeOutlined, UserOutlined, PictureOutlined ,SmileOutlined, UserAddOutlined ,ApartmentOutlined,MenuOutlined, ProfileOutlined} from '@ant-design/icons'
import { Index as Banner } from '../views/banner/Index'
import { AddBanner } from '../views/banner/AddBanner'
import React from 'react';
import { User } from '../views/user/Index'
import {Home} from '../views/home/Index'
import Employee from '../views/employee/Index'
import {Admin} from '../views/admin/Index'
import {AdminList} from '../views/admin/AdminList'
import {AddAdmin} from '../views/admin/AddAdmin'
import {Order} from '../views/oder/Index'


export interface MenuType {
    key: string;
    icon?: React.ReactNode;
    label: string,
    children?: MenuType[],
    element?: React.ReactNode,
    index?: number,
    keyId:string
}

const menus = [
    {
        key: '/',
        icon: <HomeOutlined />,
        label: '后台首页',
        element:<Home/>,
        keyId:"0-0",
    },
    {
        key: '/banner',
        icon: <PictureOutlined />,
        label: '轮播图管理',
        element: <Banner />,
        keyId:"0-1",
        children: [
            
            {
                key: '/banner/add',
                icon: <PictureOutlined />,
                label: '轮播图修改',
                element: <AddBanner />,
                keyId:"0-1-2",
                index: 1,
            }
        ]
    },
    {
        key: '/user',
        icon: <UserOutlined />,
        label: '用户管理',
        element: <User />,
        keyId:"0-2"
    },
    {
        key: '/employee',
        icon: <SmileOutlined /> ,
        label: '员工管理',
        element: <Employee />,
        keyId:"0-3"
    },
    {
        key: '/admin',
        icon: <ApartmentOutlined />,
        label: '管理员列表',
        element: <Admin />,
        keyId:"0-4",
        children:[
            {
                key: '/admin/list',
                icon:<MenuOutlined />,
                index:1,
                label: '管理员列表',
                element: <AdminList />,
                keyId:"0-4-1",    
            },
            {
                key: '/admin/add',
                icon: <UserAddOutlined />,
                index:1,
                label: '添加管理员',
                element: <AddAdmin />,  
                keyId:"0-4-2",  
            },
        ],
    },
    {
        label: '项目订单',
        icon: <ProfileOutlined />,
        key: '/oder', 
        element: <Order /> ,
        keyId:"0-5",
    },
]

export default menus